]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Don't send all debug messages to Telepathy
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 13 Feb 2014 00:04:58 +0000 (01:04 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 13 Feb 2014 12:03:37 +0000 (13:03 +0100)
The log handler can be invoked at bad times, and in particular
it can be invoked from gsignal with the signal lock taken.
At that time, calling into arbitrary high-level APIs can
cause a dead-lock.
Instead, only send to telepathy the tp-glib debug messages.
Everything else is in the journal anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=724256

src/main.c

index 99494a04ddbce98539af46973579530c056ccd3c..55f6683949ac4188ca431e24d728d52287f99263 100644 (file)
@@ -271,7 +271,9 @@ default_log_handler (const char     *log_domain,
 
   g_get_current_time (&now);
 
-  tp_debug_sender_add_message (sender, &now, log_domain, log_level, message);
+  /* Send telepathy debug through DBus */
+  if (log_domain != NULL && g_str_has_prefix (log_domain, "tp-glib"))
+    tp_debug_sender_add_message (sender, &now, log_domain, log_level, message);
 
   /* Filter out telepathy-glib logs, we don't want to flood Shell's output
    * with those. */